Florian Müllner [Sat, 9 Feb 2019 06:52:28 +0000 (07:52 +0100)]
aggregateMenu: Don't use system menu for width computation
If the user's real name is too long to fit the menu comfortably, we are
supposed to use the username instead. However since commit f8e5e3e435f,
we no longer set a max-width on the menu as a whole, but instead base
the width request on only "unellipsizable" children. For some reason
the system menu ended up there, so the name is now allowed to grow
indefinitely.
Remove it from the list of size children to get the intended behavior
back.
The menu grabs the key focus when opened, which takes focus away from
whichever actor triggered the keyboard. And as the menu doesn't have
any text entries, the keyboard is popped down as a result.
Prevent this by making the menu items unfocusable, so the keyboard
focus just stays where it is. Considering that the menu is part
of the on-screen keyboard itself, not being keyboard-navigatable
isn't a big deal here.
Menu items use a single 'active' state that follows both hover and
keyboard focus. It therefore makes sense for the active item to always
grab the focus, in particular as an item that is sensitive but not
focusable by keynav would be rather weird.
As it turns out, we do have a case that is weird enough where we want
exactly that, so only grab focus if the actor's :can-focus property
allows it.
Florian Müllner [Sat, 9 Feb 2019 03:56:58 +0000 (04:56 +0100)]
lookingGlass: Include St in default imports instead of Gtk
Until commit 467b7c1bcacebdc, the import used to leak into the
eval() environment, but not anymore. Add it back (and remove
Gtk, as it's not *that* useful).
Florian Müllner [Thu, 7 Feb 2019 00:56:29 +0000 (01:56 +0100)]
tests: Work around import dependency loop
The markup unit test currently fails with the following message:
TypeError: class heritage MessageList.Message is not an object or null
This is because MessageList imports other modules that end up importing
MessageList themselves in order to inherit from one of its classes. But
as the MessageList imports hasn't finished yet (it's still processing
its own imports), that class hasn't been defined yet.
Work around that by importing Main first, so that the importer can
process imports in a proper order.
extensionUtils: Include some more helper functions
Those functions originated in gnome-shell-extension's Convenience
module which is copied by almost every extension out there. Let's
make people's life just a little bit easier by including the code
ourselves.
Florian Müllner [Tue, 5 Feb 2019 00:11:43 +0000 (01:11 +0100)]
panel: Restrict app menu width
Window titles aren't restricted in length, so the menu may end up unwieldily
width. Commit 0bec76b6ee therefore limited the app context menus, but that
got accidentally dropped in commit 0ded0dbfd5. Add back the limitation and
extend it to the new app menu as well.
Florian Müllner [Mon, 4 Feb 2019 23:30:41 +0000 (00:30 +0100)]
panel: Desaturate appmenu icon
Top bar icons are supposed to by symbolic, but not all applications
provide a symbolic icon. Make the stick out less by desaturating
the appmenu icon if a symbolic style is requested.
Florian Müllner [Thu, 4 Oct 2018 17:11:05 +0000 (19:11 +0200)]
app: Don't rely on app menu to check for GtkApplications
As the app menu is being phased out, it is no longer a good indicator
for GtkApplications. Instead, base the check directly on the appropriate
D-Bus properties.
Florian Müllner [Thu, 4 Oct 2018 15:14:00 +0000 (17:14 +0200)]
windowMenu: Remove fallback app menu support
With the app menu being phased out entirely, there's no good reason to
keep support for the fallback app menu in decorations either - the number
of applications that set an app menu and haven't embraced client-side
decorations is extremely small, and they should already have alternative
fallbacks for non-GNOME environment in place.
Florian Müllner [Thu, 4 Oct 2018 14:52:34 +0000 (16:52 +0200)]
panel: Replace remote app menu
Since the plans to retire the app menu were announced, nobody objected to
the removal of the menu content, however some concerns were raised about
the menu's secondary role as indicator.
Account for that by not removing the existing app menu, but replacing it
with a built-in menu similar to the existing app icon context menu.
Florian Müllner [Thu, 4 Oct 2018 14:52:34 +0000 (16:52 +0200)]
panel: Ignore shell-shows-app-menu setting
The GtkSettings was originally introduced to inform applications about
the desktop shell's capabilities, but users soon started to use it to
force GTK+ to show the app menu inside the application. We eventually
caved and also handled the setting ourselves to hide the in-shell app
menu to allow users to "move" it.
But now the remote app menu is in the process of being retired[0], and
will be replaced with a simple indicator that cannot be moved, so
stop following the GtkSetting.
Ray Strode [Wed, 23 Jan 2019 20:59:42 +0000 (15:59 -0500)]
shellActionModes: disable POPUP keybindings in unlock screen
Certain keybindings should continue to work even when a popup
menu is on screen. For instance, the keybinding for showing
the app menu and the keyinding for showing the calendar are
examples.
This is achieved by putting in place a special "POPUP" action
mode, whenever a popup menu is active. This mode replaces
the (e.g., "NORMAL" or "OVERVIEW") action mode that was in place
for as long as the popup menu is active.
But those keybindings should not work when the user is at the
unlock dialog (which uses an action mode of "UNLOCK").
Florian Müllner [Wed, 23 Jan 2019 22:55:12 +0000 (23:55 +0100)]
panel: Don't allow opening hidden menus via keybindings
We shouldn't allow toggling menus that aren't supported by the
current session mode, but as indicators are hidden rather than
destroyed on mode switches, it is not enough to check for an
indicator's existence.
Carlos Garnacho [Fri, 22 Dec 2017 15:02:51 +0000 (16:02 +0100)]
keyboard: Add Emoji keyboard
This keyboard works similar to GTK+'s emoji chooser (actually, both pull
from the same JSON file). Emojis are categorized in sections and variants
and kept in a "model".
The EmojiPager actor then uses this model to generate pages on-the-fly as
the user swipes around. This is an important optimization since the amount
of actors would rival with the rest of the shell otherwise.
The EmojiSelection object puts the EmojiPager, the page indicators and
a KeyContainer with the bottom row of emoji section shortcuts together to
implement the emoji panel as a whole.
The Keyboard object hooked this to an "emoji" key, which is just visible
on the Clutter.InputContentPurpose where showing an emoji would be
meaningful. Otherwise the surrounding buttons are made a bit wider to
cover up for it (i.e. as it was before).
Carlos Garnacho [Tue, 22 Jan 2019 11:10:51 +0000 (12:10 +0100)]
appDisplay: Separate PageIndicators to a separate file
In order to cater for emoji panel usage, we want something like PageIndicators
except:
- It should have horizontal disposition
- It should not be animatable (?)
- It should not be reactive
Separated PageIndicators into a base, non-animated widget, and an
AnimatedPageIndicators that can be used on appDisplay.js. Reactiveness is
set through an extra method, and layout is set as a construct argument.
Carlos Garnacho [Mon, 21 Jan 2019 20:39:27 +0000 (21:39 +0100)]
keyboard: Separate aspect ratio control to a container actor
This will be useful as we want other panels (eg. emoji) to preserve aspect
ratio with the rest of the OSK. Separate the aspect ratio management logic
into this container that will be the parent of them all.
Carlos Garnacho [Mon, 21 Jan 2019 20:34:27 +0000 (21:34 +0100)]
theme: Reduce minimum OSK key width/height
The OSK panel uses 1/3rd of the monitor height, plus we specify a minimum
size for the keys. This doesn't play along if contents won't fit (short
monitor, big fonts, ...) pushing contents offscreen. Reduce the minimum
size a bit so there's better chances to fit.
Florian Müllner [Wed, 30 Jan 2019 16:48:28 +0000 (17:48 +0100)]
panel: Remove panel translucency
Since commit 447bf55e45b we turn the top bar translucent when
free-floating. While this looks fancy and reduces the appearance
of cutting into the available screen space, it has also had a
negative effect on legibility.
Nobody stepped up to address those issues in two years, so revert
back to the fully opaque top bar.
Having Unity-like shortcuts for activating the first nine applications
in the dash has been a long requested feature, but somehow nobody got
around to implement it.
As the shortcut is most useful outside the overview where the dash is
not visible, only consider favorite apps as they have a predictable
order.
Florian Müllner [Fri, 1 Feb 2019 19:11:39 +0000 (20:11 +0100)]
extensionPrefs: Work around xgettext bug
xgettext is thrown off by the combination of backticks and slashes,
which makes template string a fun trap to fall into. Just use
String.format() for now ...
verdre [Wed, 30 Jan 2019 19:54:44 +0000 (20:54 +0100)]
workspace: Rename some variables for clarity
Since the overlays we show on hover above the window clones are no
longer only a close button, but the window title, a border and a close
button, rename a few variables so it's easier to understand what they're
for.
As of https://gitlab.gnome.org/GNOME/gnome-weather/commit/9f7f5a68d47c5aaa0d18453f51c92a629c88ed78 Weather uses
org.gnome.Weather everywhere instead of org.gnome.Weather.Application.
Florian Müllner [Wed, 30 Jan 2019 22:00:35 +0000 (23:00 +0100)]
a11y: Don't set WM theme
We've been using GTK to draw server-side decorations according to the
GTK theme for a long time, so no need to configure the HighContrast
theme for a setting we don't use.
Florian Müllner [Mon, 6 Aug 2018 02:15:12 +0000 (04:15 +0200)]
extensionPrefs: Improve error UI
Currently when a preference widget fails to load, we throw a raw
backtrace at the user. While that is undoubtedly useful information
for extension developers and bug reports, it is gibberish to most
users and hardly the first thing they should be exposed to.
Florian Müllner [Mon, 6 Aug 2018 00:31:18 +0000 (02:31 +0200)]
extensionPrefs: Add blank state
We currently show a big white window in case no extensions are
installed, which clearly isn't helpful. Add a small blank state
that explains what's going on.
Carlos Garnacho [Tue, 27 Nov 2018 12:36:26 +0000 (13:36 +0100)]
overview: Do not warp pointer to fake crossing event
This is actually papering over bugs in toolkits. On X11 the Xserver will
send crossing events when the stage input shape changes. As those go
end up ignored in GTK+, this warp call aims (and randomly manages) to send
a motion event that wouldn't go unlistened by the drag source window (the
one holding the grab).
This bug actually manifests in other ways, eg. by changing the window
beneath the pointer with alt-tab while DnDing. This should be fixed
altogether in the client side.
Carlos Garnacho [Tue, 27 Nov 2018 12:35:46 +0000 (13:35 +0100)]
modalDialog: Do not sync display here
This gdk_display_sync() call was added in commit a40daa3c22 so the alt-f2
dialog is able to spawn commands that trigger grabs on startup (eg. xmag/
xkill).
This seems worthwhile to do only on the X11 backend, and handling it in
mutter backend code seems cleaner.
Our helper method to translate a string according to the LC_TIME
setting uses the no-thread-safe setlocale(). While that's not an
issue in practice given that all JS code shares a single thread,
I was pointed to a better alternative when adopting the same
handling in gnome-desktop's wallclock[0].
Philip Withnall [Thu, 1 Nov 2018 20:56:25 +0000 (20:56 +0000)]
screenShield: Show detailed notification data if notifications hint it
Allow notifications to set a x-gnome-privacy-scope hint, with values in
['system', 'user']. If all the notifications in a particular source hint
that their privacy scope is ‘system’, don’t hide the notification
details on the lock screen.
This is aimed at fixing the particular case of power notifications: they
contain information which is not private to the user (it relates to the
system: battery state or AC state, which is obvious to anyone who can
see the machine), so hiding the details of a power management
notification when the screen is locked is pointless.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/gnome-shell/issues/726